package com.hspedu.Map_;

import java.util.HashMap;
import java.util.Objects;

public class HashMapSource2 {
    public static void main(String[] args) {
        HashMap hashMap = new HashMap();
        for (int i = 1; i <=12; i++) {
            hashMap.put(new A(i),i);
        }
        System.out.println(hashMap);
    }
}

class A{

    private int num;

    public A(int num) {
        this.num = num;
    }

    @Override
    public int hashCode() {
        return Objects.hash(num);
    }
}
